/*
 * This file is part of ksPlatform
 * 
 * Copyright (c) 2014-2015
 * 
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) 
 * 
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at 97041437@qq.com.
 */
package cn.com.ksplatform.modules.system.install.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.com.ksplatform.base.Return;
import cn.com.ksplatform.base.SimpleReturn;
import cn.com.ksplatform.modules.system.install.help.DataInstallHelp;

/**
 * 系统数据初始化
 * @author Simon
 *
 */
@Controller
@RequestMapping("/modules/system/install")
@Component("systemInstallController")
public class InstallController{
	@Autowired
	DataInstallHelp dih;
	
	@RequestMapping("doInstall")
	@ResponseBody
	public Return install(){
		//初始化菜单
		//MenuInstallHelp.installMenus(menuService);
		//UserInstallHelp.installUsers(userService);
		dih.installBaseData();
		return SimpleReturn.success("初始化数据成功！");
	}
}
